package xsxdjc
public class SQLChaXun2{
	public static Closure rule = {_context_ ->
		HashMap _result_ = new HashMap();
		_result_.rname = 'SQL查询2';
		_result_.rpath = 'xsxdjc/SQLChaXun2';
		
		//before query as below
		//execute sql query
		String _sql_statement_ = """
		select * from user
		""";
		
		_result_.data = new Object(){
			
			java.util.concurrent.CompletableFuture<List<Map<String, Object>>> sql =
				 java.util.concurrent.CompletableFuture.supplyAsync({return (new org.springframework.jdbc.core.JdbcTemplate(Setting.jdbcTemplate.dataSource)).queryForList(_sql_statement_)});
			List<Map<String, Object>> getSql(){return sql.get();};
		};
		//after sql query execution
		
		return _result_;
	};
};